package dk.dtu.student.assignmentfour;

import java.util.ArrayList;
import java.util.List;

public class SmsThread {

	private String threadId;
	private List<SmsMessage> list;
	private double threadMood;
	private String contactId;
	private String contactName;
	
	public SmsThread(String threadId, String contactId, String contactName) {
		list = new ArrayList<SmsMessage>();
		this.threadId = threadId;
		this.contactId = contactId;
		this.contactName = contactName;
	}
		
	public String getContactName() {
		return contactName;
	}
	
	public void setContactName(String contactName) {
		this.contactName = contactName;
	}
	
	public String getContactId()
	{
		return contactId;
	}
	
	private void setContactId(String contactId)
	{
		this.contactId = contactId;
	}
	
	public double getThreadMood()
	{
		return threadMood;
	}
	
	public void setThreadMood(double threadMood)
	{
		this.threadMood = threadMood;
	}
	
	public int getSmsCount()
	{
		return list.size();
	}
	
	public void addSmsMessage(SmsMessage message)
	{
		list.add(message);
	}
	
	public SmsMessage getSmsMessage(int position)
	{
		if (null == list || position > list.size() || position < list.size()) return null;
		return list.get(position);
	}
	
	public List<SmsMessage> getAllSmsMessages()
	{
		return list;
	}
	
	public String getThreadId()
	{
		return threadId;
	}
}
